<?
//  File Manager - main
error_reporting(E_ALL);

require_once 'classes/Config.class.php';
require_once 'classes/AbstractFile.class.php';
require_once 'classes/File.class.php';
$classes = glob('classes/*.class.php');
foreach ($classes as $class) {
    require_once $class;
}

if (!isset($_GET['path'])) {
    $_GET['path'] = '';
}
if (!isset($_GET['object'])) {
    $_GET['object'] = '';
}

if (isset($_GET['mode'])) {
    $fm = new FileManager('mode='.$_GET['mode']);
} else {
    $fm = new FileManager();
}
$fm->setCurrent($_GET['path'],$_GET['object']);
$fm->action();
$fm->render();

?>